From 24d6d0c60d391d8b058511d548deaa0523fdb9d1 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sat, 13 Nov 2004 19:41:08 +0000 Subject: [PATCH] Probably solve http://bugzilla.wikipedia.org/show_bug.cgi?id=733 Die with error message if we can't fwrite localsettings.php. --- config/index.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/config/index.php b/config/index.php index ef570f763d..fe0ad95f2e 100644 --- a/config/index.php +++ b/config/index.php @@ -595,11 +595,16 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { "

Here's the file that would have been written, try to paste it into place manually:

\n" . "
\n" . htmlspecialchars( $localSettings ) . "
\n" ); } - fwrite( $f, $localSettings ); - fclose( $f ); + if(fwrite( $f, $localSettings ) ) { + fclose( $f ); - print "

Success! Move the config/LocalSettings.php file into the parent directory, then follow - this link to your wiki.

\n"; + print "

Success! Move the config/LocalSettings.php file into the parent directory, then follow + this link to your wiki.

\n"; + } else { + fclose( $f ); + die("

An error occured while writing the config/LocalSettings.php file. Check user rights and disk space then try again.

\n"); + + } } while( false ); } -- 2.20.1